﻿package cn.ffcs.businessrequest.model;


import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.apache.commons.lang.StringUtils;

import cn.ffcs.base.model.BaseEntity;
import cn.ffcs.bpm.model.BizProcessManage;
import cn.ffcs.bpm.model.ProcTranRecord;
import cn.ffcs.organ.model.LinkMethod;
import cn.ffcs.organ.model.Organization;
import cn.ffcs.organ.model.Person;
import cn.ffcs.system.dict.model.Dict;

/**
 * 产品目录实体类：定义基本属性<br/>
 * <table>
 * <tr>
 * <td>负责人/principal:</td>
 * <td colspan="2">g.pany</td>
 * <tr>
 * <td>修改记录/revision:</td>
 * <td colspan="2"></td>
 * </tr>
 * <tr>
 * <td>日期:2009-4-20</td>
 * <td>修改人:g.pany</td>
 * <td>修改说明:</td>
 * </tr>
 * <tr>
 * <td></td>
 * <td></td>
 * <td></td>
 * </tr>
 * </table>
 * @author g.pany
 * @version $Id$
 */

public class BusinessRequest extends BizProcessManage
{
    
    /** TODO 请输入字段日志 */
    private static final long serialVersionUID = -4306022199363708293L;

    /** 名称**/
    private String name;
    
    /** 需求内容**/
    private String content;
    
    /** 发起人**/
    private String startPerson;
    
    /** 发起部门**/
    private String startDept;

    /** 产品经理**/
    private Person prodPerson;

    /** 产品部门**/
    private Organization prodDept;

    /** 通知方式**/
    private String callMode;

    /** 联系电话**/
    private String phone;
    
    /** 提出时间**/
    private Date advanTime;

    /** 需求单号**/
    private String reqCode;

    /** 重要性**/
    private String importance;

    /** 需求类型**/
    private String type;
    
    /** 需求类型(大类)**/
    private String daiType;

    /** 关联产品**/
    private String relaProd;

    /** 当前状态**/
    private String currStatus;

    /** 当前办理人**/
    private String currUser;

    /** 公文编号**/
    private String officialNo;

    /** 公文名称**/
    private String officialName;
    
    /** 距离到期剩余天数**/
    private String limitDate;
    
    /** 距离到期剩余天数**/
    private Date timeLimit;
    
    /** 是否填写进展信息 1已经填写  0未填写**/
    private String isReqProgresse;

    /** 距离到期剩余天数**/
    private List<ProcTranRecord> procTranRecords=new ArrayList<ProcTranRecord>();
    
    private Integer procinstId;

    private String projectApply;

    /** 发起人**/
    private Person startPersonObj;

    /** 发起部门**/
    private Organization startDeptObj;  
    
    private String procinstType;

    //report start
    private List display=new ArrayList();
    
    private List reqProgresses=new ArrayList();
    
    private int percent=0;
    
    private String isValidDate;
    
    private Date planTime;
    //实际完成时间
    private Date actTime;
    
    private String urlType;
    
    /** 周报月报完成情况**/
    private String weekContent;
    
    /** 周报配置**/
    private String weekState;
    
    /** 月报配置**/
    private String monthState;
    
    /** 业务标签**/
    private String businessTag;
    
    public String getBusinessTag() {
		return businessTag;
	}

	public void setBusinessTag(String businessTag) {
		this.businessTag = businessTag;
	}

	public String getWeekContent() {
    	if(weekContent!=null&&!"".equals(weekContent)){
    		weekContent=weekContent.replaceAll("\n", "<br/>");
		}
		return weekContent;
	}

	public void setWeekContent(String weekContent) {
		this.weekContent = weekContent;
	}

	//end
    public String getLimitDate()
    {
        return limitDate;
    }

    public void setLimitDate(String limitDate)
    {
        this.limitDate = limitDate;
    }

    public Date getAdvanTime()
    {
        return advanTime;
    }

    public void setAdvanTime(Date advanTime)
    {
        this.advanTime = advanTime;
    }

    public String getCallMode()
    {
        return callMode;
    }

    public void setCallMode(String callMode)
    {
        this.callMode = callMode;
    }

    public String getContent()
    {
    	//content=StringUtils.replace(content, "\n", "<br/>");
        return content;
    }

    public void setContent(String content)
    {
        this.content = content;
    }

    public void replaceContentNtoBR(){
    	content=StringUtils.replace(content, "\n", "<br/>");
    }

    public void replaceContentBRtoN(){
    	content=StringUtils.replace(content, "<br/>", "\n");
    }
    
    public String getCurrStatus()
    {
//        if(super.getTransactProcessStatus()!=null&&super.getTransactProcessStatus().getCurrProcessConfigDetail()!=null){
//            return super.getTransactProcessStatus().getCurrProcessConfigDetail().getName();
//        }
        return currStatus;
    }

    public void setCurrStatus(String currStatus)
    {
        this.currStatus = currStatus;
    }

    public String getCurrUser()
    {
        return currUser;
    }

    public void setCurrUser(String currUser)
    {
        this.currUser = currUser;
    }

    public String getImportance()
    {
        return importance;
    }

    public void setImportance(String importance)
    {
        this.importance = importance;
    }

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public String getPhone()
    {
        return phone;
    }

    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public Organization getProdDept()
    {
        return prodDept;
    }

    public void setProdDept(Organization prodDept)
    {
        this.prodDept = prodDept;
    }

    public Person getProdPerson()
    {
        return prodPerson;
    }

    public void setProdPerson(Person prodPerson)
    {
        this.prodPerson = prodPerson;
    }

    public String getRelaProd()
    {
        return relaProd;
    }

    public void setRelaProd(String relaProd)
    {
        this.relaProd = relaProd;
    }

    public String getReqCode()
    {
        return reqCode;
    }

    public void setReqCode(String reqCode)
    {
        this.reqCode = reqCode;
    }

    public String getType()
    {
        return type;
    }

    public void setType(String type)
    {
        this.type = type;
    }

    public String getOfficialName()
    {
        return officialName;
    }

    public void setOfficialName(String officialName)
    {
        this.officialName = officialName;
    }

    public String getOfficialNo()
    {
        return officialNo;
    }

    public void setOfficialNo(String officialNo)
    {
        this.officialNo = officialNo;
    }

    public String getIsReqProgresse()
    {
        return isReqProgresse;
    }

    public void setIsReqProgresse(String isReqProgresse)
    {
        this.isReqProgresse = isReqProgresse;
    }

    public String getStartDept()
    {
        return startDept;
    }

    public void setStartDept(String startDept)
    {
        this.startDept = startDept;
    }

    public String getStartPerson()
    {
        return startPerson;
    }

    public void setStartPerson(String startPerson)
    {
        this.startPerson = startPerson;
    }

    public Date getTimeLimit()
    {
        return timeLimit;
    }

    public void setTimeLimit(Date timeLimit)
    {
        this.timeLimit = timeLimit;
    }

    public List<ProcTranRecord> getProcTranRecords()
    {
        return procTranRecords;
    }

    public void setProcTranRecords(List<ProcTranRecord> procTranRecords)
    {
        this.procTranRecords = procTranRecords;
    }

	public Person getStartPersonObj() {
		return startPersonObj;
	}

	public void setStartPersonObj(Person startPersonObj) {
		this.startPersonObj = startPersonObj;
	}

	public Organization getStartDeptObj() {
		return startDeptObj;
	}

	public void setStartDeptObj(Organization startDeptObj) {
		this.startDeptObj = startDeptObj;
	}

	public Integer getProcinstId() {
		return procinstId;
	}

	public void setProcinstId(Integer procinstId) {
		this.procinstId = procinstId;
	}

	public String getProjectApply() {
		return projectApply;
	}

	public void setProjectApply(String projectApply) {
		this.projectApply = projectApply;
	}

	public String getProcinstType() {
		return procinstType;
	}

	public void setProcinstType(String procinstType) {
		this.procinstType = procinstType;
	}

	 public List getDisplay()
	    {
	        return display;
	    }

	    public void setDisplay(List display)
	    {
	        this.display = display;
	    }

	    public List getReqProgresses()
	    {
	        return reqProgresses;
	    }

	    public void setReqProgresses(List reqProgresses)
	    {
	        this.reqProgresses = reqProgresses;
	    }

	    public int getPercent()
	    {
	        return percent;
	    }

	    public void setPercent(int percent)
	    {
	        this.percent = percent;
	    }

		public String getIsValidDate() {
			return isValidDate;
		}

		public void setIsValidDate(String isValidDate) {
			this.isValidDate = isValidDate;
		}

		public Date getPlanTime() {
			return planTime;
		}

		public void setPlanTime(Date planTime) {
			this.planTime = planTime;
		}

		public Date getActTime() {
			return actTime;
		}

		public void setActTime(Date actTime) {
			this.actTime = actTime;
		}

		public String getUrlType() {
			return urlType;
		}

		public void setUrlType(String urlType) {
			this.urlType = urlType;
		}

		public String getDaiType() {
			return daiType;
		}

		public void setDaiType(String daiType) {
			this.daiType = daiType;
		}

		public String getWeekState() {
			return weekState;
		}

		public void setWeekState(String weekState) {
			this.weekState = weekState;
		}

		public String getMonthState() {
			return monthState;
		}

		public void setMonthState(String monthState) {
			this.monthState = monthState;
		}

}
